package com.foreknow.elm.controller;

import com.foreknow.elm.po.Food;
import com.foreknow.elm.service.FoodService;
import com.foreknow.elm.service.impl.FoodServiceImpl;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public class FoodController {
    /**
     * 根据商家编号查询所属食品信息
     * @param businessId
     * @return
     */
    public Object listFoodByBusinessId(HttpServletRequest request){
        String ro =request.getParameter("businessId");
        Integer businessId= Integer.valueOf(ro);
        FoodService foodService = new FoodServiceImpl();
        List<Food> list =foodService.listFoodByBusinessId(businessId);
        return list;
    }

}
